package cn.itlaobing.springboot.dao.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import cn.itlaobing.springboot.dao.BaseDao;
import cn.itlaobing.springboot.dao.StudentDao;
import cn.itlaobing.springboot.entity.Student;
@Repository
public class StudentDaoImpl extends BaseDao implements StudentDao {

	
	@Autowired
	private JdbcTemplate jdbcTemplate;
	@Override
	@Transactional
	public void save(Student student) {
		String sql = "insert into yonghu(username,userpass) values(?,?)";
		jdbcTemplate.update(sql,student.getUsername(),student.getUserpass());
		
	}

}
